#

| Chapter 4 The Bourne Shell and Korn Shell |

## alias

    alias [options] [name[='cmd']]

Korn shell only. Assign a shorthand `name` as a synonym for `cmd`. If ='`cmd`' is omitted, print the alias for `name`; if `name` is also omitted, print all aliases. See also unalias. The aliases below are built into the Korn shell. Some use names of existing Bourne shell or C shell commands (which points out the similarities among the shells).

>     autoload='typeset -fu'
>     echo='print -'
>     false='let 0'
>     function='typeset -f'
>     hash='alias -t'
>     history='fc -l'
>     integer='typeset -i'
>     nohup='nohup '
>     pwd='print -r - $PWD'
>     r='fc -e -'
>     true=':'
>     type='whence -v'

### Options

-t

  Create a tracked alias for a UNIX command `name`. The Korn shell remembers the full pathname of the command, allowing it to be found more quickly and to be issued from any directory. If no name is supplied, current tracked aliases are listed. Tracked aliases are the same as hashed commands in the Bourne shell.

-x

  Export the alias; it can now be used in shell scripts and other subshells. If no name is supplied, current exported aliases are listed.

### Example

>     alias dir='basename `pwd`'

Reference: name |  | Reference: autoload